package com.hmall.model;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

@Data
@Table(name = "mall_order")
public class MallOrder {
    /**
     * 订单id
     */
    @Id
    private Integer id;

    /**
     * 订单号
     */
    @Column(name = "order_no")
    private Long orderNo;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "shipping_id")
    private Integer shippingId;

    /**
     * 总付款金额,单位是元,保留两位小数
     */
    private BigDecimal payment;

    /**
     * 支付类型,1-线下支付 2 工行支付
     */
    @Column(name = "payment_type")
    private Integer paymentType;

    /**
     * 运费,单位是元
     */
    private Integer postage;

    /**
     * 历史原因比较错乱
     订单状态：审核中-10，审核过待付款(未付定金）-30，已付款待发货-20， 发货中，可以进行评价-60 ，已取消-0，用户收货确认即交易完成-50
     70, 付款凭证审核中
     ###弃用 已经开始分期支付-45；，未签合同-35，合同失效-36， 已发货-40
     */
    private Integer status;

    /**
     * 支付时间
     */
    @Column(name = "payment_time")
    private Date paymentTime;

    /**
     * 发货时间
     */
    @Column(name = "send_time")
    private Date sendTime;

    /**
     * 交易完成时间
     */
    @Column(name = "end_time")
    private Date endTime;

    /**
     * 交易关闭时间
     */
    @Column(name = "close_time")
    private Date closeTime;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "memberToken")
    private String membertoken;

    /**
     * 配送方式code
     */
    @Column(name = "distCode")
    private Integer distcode;

    /**
     * 允许下单限时
     */
    @Column(name = "add_order_time")
    private Integer addOrderTime;

    /**
     * 是否启用 1 启用 2 禁用
     */
    private Integer enabled;

    /**
     * 留言
     */
    private String message;

    /**
     * 发票收件人
     */
    @Column(name = "Invoice_rec_person")
    private String invoiceRecPerson;

    /**
     * 发票收件人手机
     */
    @Column(name = "Invoice_rec_phone")
    private String invoiceRecPhone;

    /**
     * 发票所到地址
     */
    @Column(name = "Invoice_rec_address")
    private String invoiceRecAddress;

    /**
     * 拿样状态 1表示是 0表示否
     */
    @Column(name = "is_sample")
    private Integer isSample;

    /**
     * 店铺id
     */
    @Column(name = "shop_id")
    private Integer shopId;

    /**
     * 运单号
     */
    @Column(name = "waybill_no")
    private String waybillNo;

    /**
     * 物流公司
     */
    @Column(name = "logistics_company")
    private String logisticsCompany;

    /**
     * 经销商id
     */
    @Column(name = "dealer_id")
    private Integer dealerId;

    /**
     * 1代表普通用户 2代表业务员
     */
    @Column(name = "submit_person")
    private Integer submitPerson;

    /**
     * 是否经过了审批
     */
    @Column(name = "exam_check")
    private Integer examCheck;

    /**
     * 是否是计划单下的订单0代表普通订单1代表计划单订单
     */
    @Column(name = "plan_check")
    private Integer planCheck;

    @Column(name = "status1")
    private Integer status1;

    @Column(name = "status2")
    private Integer status2;

    @Column(name = "status3")
    private Integer status3;

    @Column(name = "send_date")
    private String sendDate;

    @Column(name = "transport_Id")
    private Integer transportId;
}